﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace _0517病例系统
{
    public partial class frmfindcs : Form
    {
        public frmfindcs()
        {
            InitializeComponent();
        }
        public static string z, s, l, k,r,v,w,q,f,h;
        private void button1_Click(object sender, EventArgs e)
        {
            if(dataGridView1.SelectedRows.Count>0)
            {
                z=dataGridView1.CurrentRow.Cells["编号"].Value.ToString();
                s=dataGridView1.CurrentRow.Cells["姓名"].Value.ToString();
                l=dataGridView1.CurrentRow.Cells["性别"].Value.ToString();
                k=dataGridView1.CurrentRow.Cells["电话"].Value.ToString();
                r = dataGridView1.CurrentRow.Cells["药品项目"].Value.ToString();
                v = dataGridView1.CurrentRow.Cells["药品价格"].Value.ToString();
                w=dataGridView1.CurrentRow.Cells["检查项目"].Value.ToString();
                q=dataGridView1.CurrentRow.Cells["检查价格"].Value.ToString();
                f=dataGridView1.CurrentRow.Cells["检验项目"].Value.ToString();
                h=dataGridView1.CurrentRow.Cells["检验价格"].Value.ToString();
            }
            this.Close();
            frmCharge ch = new frmCharge();
            ch.Show();
        }

        private void frmfindcs_Load(object sender, EventArgs e)
        {
            string strSql;
            DataAccess data = new DataAccess();
            DataSet ds;
            strSql = "select * from chuangjianss where 1=1";
            data.dataCon();
            ds = data.getDataset(strSql);
            dataGridView1.DataSource = ds.Tables[0];
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
            frmCharge ch = new frmCharge();
            ch.Show();
        }
    }
}
